package com.sxjh.entity.param;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Data
@ApiModel(description = "新增合同模型")
public class ContractAddParam {

    @ApiModelProperty(value = "合同号", position = 1)
    @NotNull(message = "合同号不能为空")
    @NotBlank(message = "合同号不能为空")
    private String contractNumber;

    /**
     * 合同类别;0|自产自销,1|集团外采,2|集团外销,3|股份外采,4|股份外销
     */
    @ApiModelProperty(value = "合同类别;0|自产自销,1|集团外采,2|集团外销,3|股份外采,4|股份外销", example = "0")
    @TableField("contract_category")
//  @NotNull(message = "合同类别不能为空")
    @Min(value = 0, message = "合同类别只能为0到4")
    @Max(value = 4, message = "合同类别只能为0到4")
    private Integer contractCategory;

    @ApiModelProperty(value = "合同种类;0|普通,1|子合同", required = true, example = "0")
    @NotNull(message = "合同种类不允许为空")
    @Min(value = 0, message = "合同种类只能位0或1")
    @Max(value = 1, message = "合同种类只能位0或1")
    private Integer contractKind;

    @ApiModelProperty("扣水模式;0|百分比±,1|百分比-,2|计价水±,3|加价水-,4|干基")
    @TableField("deduct_water_type")
    private Integer deductWaterType;

    @ApiModelProperty(value = "母合同ID", hidden = true)
    private Integer motherId;

    @ApiModelProperty("母合同号")
    private String motherContractNumber;

    @ApiModelProperty(value = "买方公司ID")
//  @NotNull(message = "供应商ID不能为空")
    private Integer customerUserId;
    @ApiModelProperty(value = "卖方公司ID")
//  @NotNull(message = "供应商ID不能为空")
    private Integer sellerCustomerUserId;

    @ApiModelProperty(value = "产品类别ID")
//  @NotNull(message = "产品类别不能为空")
    private Integer materialId;

    @ApiModelProperty(value = "合同起始日期")
//  @NotNull(message = "合同起始日期不能为空")
    private LocalDate startDate;

    @ApiModelProperty(value = "合同终止日期")
//  @NotNull(message = "合同终止日期不能为空")
    private LocalDate expiryDate;

    @ApiModelProperty(value = "合同数量")
//  @NotNull(message = "合同数量不能为空")
    private BigDecimal quantity;

    @ApiModelProperty(value = "合同价格")
    @NotNull(message = "合同价格不能为空")
    private BigDecimal price;

    @ApiModelProperty(value = "到站")
//  @NotNull(message = "到站不能为空")
    private String station;

    @ApiModelProperty(value = "运费单价")
//  @NotNull(message = "运费单价不能为空")
    private BigDecimal freight;

    @ApiModelProperty(value = "增值税率", position = 15)
//  @NotNull(message = "增值税率不能为空")
    private BigDecimal appreciationTax;

    @ApiModelProperty(value = "运费税率")
//  @NotNull(message = "运费税率不能为空")
    private BigDecimal freightTax;

    @ApiModelProperty(value = "签订部门")
//  @NotNull(message = "签订部门不能为空")
//  @NotBlank(message = "签订部门不能为空")
    private String department;

    @ApiModelProperty(value = "签订人")
//  @NotNull(message = "签订人不能为空")
//  @NotBlank(message = "签订人不能为空")
    private String signer;

    @ApiModelProperty(value = "检化验权;0|出厂,1|用户,2|第三方,3|其他方式")
//  @NotNull(message = "检化验权不能为空")
    @Min(value = 0, message = "检化验权只能选择0,1,2,3")
    @Max(value = 3, message = "检化验权只能选择0,1,2,3")
    private Integer inspection;

    @ApiModelProperty(value = "合同类型;0|车板,1|一票包到,2|两票包到")
//  @NotNull(message = "合同类型不能为空")
    @Min(value = 0, message = "合同类型只能选择0,1,2")
    @Max(value = 2, message = "合同类型只能选择0,1,2")
    private Integer contractType;

    @ApiModelProperty(value = "付款方式;0|预付,1|结算后付款")
//  @NotNull(message = "付款方式不能为空")
    @Min(value = 0, message = "付款方式只能选择0,1")
    @Max(value = 1, message = "付款方式只能选择0,1")
    private Integer paymentMethod;

    @ApiModelProperty(value = "付款类别;0|现汇,1|承兑")
//  @NotNull(message = "付款类别不能为空")
    @Min(value = 0, message = "付款类别只能选择0,1")
    @Max(value = 1, message = "付款类别只能选择0,1")
    private Integer paymentType;

    @ApiModelProperty(value = "补途;0|无补途,1|补途1‰,2|补途4%")
//  @NotNull(message = "补途不能为空")
    @Min(value = 0, message = "补途只能选择0,1,2")
    @Max(value = 2, message = "补途只能选择0,1,2")
    private Integer complementaryWay;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "合同附件")
//  @NotNull(message = "附件不能为空")
//  @NotBlank(message = "附件不能为空")
    private String attachment;

    @ApiModelProperty(value = "结算单据附件")
    private String settlementReceiptAttachment;

    @ApiModelProperty(value = "水分%")
    private BigDecimal water;

    @ApiModelProperty(value = "灰分%")
    private BigDecimal ash;

    @ApiModelProperty(value = "硫分%")
    private BigDecimal sulfur;

    @ApiModelProperty(value = "挥发分%")
    private BigDecimal volatilize;

    @ApiModelProperty(value = "M40%")
    private BigDecimal m40;

    @ApiModelProperty(value = "M10%")
    private BigDecimal m10;

    @ApiModelProperty(value = "CSR%")
    private BigDecimal csr;

    @ApiModelProperty(value = "CRI%")
    private BigDecimal cri;

    @ApiModelProperty(value = "焦沫含量%")
    private BigDecimal foam;

    @ApiModelProperty(value = "焦沫扣价刻度%", example = "0.1")
    private BigDecimal foamScale;

    @ApiModelProperty(value = "加价", example = "0.0")
    private BigDecimal markup;
    @ApiModelProperty(value = "承兑加价", example = "0.0")
    private BigDecimal dMarkup;
    @ApiModelProperty(value = "焦沫扣价/吨", example = "2")
    private BigDecimal foamDiscount;

    @ApiModelProperty(value = "灰分扣价刻度%", example = "0.1")
    private BigDecimal ashScale;

    @ApiModelProperty(value = "硫分扣价刻度%", example = "0.01")
    private BigDecimal sulfurScale;

    @ApiModelProperty(value = "挥发分扣价刻度%", example = "0.1")
    private BigDecimal volatilizeScale;

    @ApiModelProperty(value = "M10扣价刻度%", example = "1")
    private BigDecimal m10Scale;

    @ApiModelProperty(value = "M40扣价刻度%", example = "1")
    private BigDecimal m40Scale;

    @ApiModelProperty(value = "CSR扣价刻度%", example = "1")
    private BigDecimal csrScale;

    @ApiModelProperty(value = "CRI扣价刻度%", example = "1")
    private BigDecimal criScale;

    @ApiModelProperty(value = "灰分扣价/吨", example = "2")
    private BigDecimal ashDiscount;

    @ApiModelProperty(value = "硫分扣价/吨", example = "2")
    private BigDecimal sulfurDiscount;

    @ApiModelProperty(value = "挥发分扣价/吨", example = "2")
    @TableField("volatilize_discount")
    private BigDecimal volatilizeDiscount;

    @ApiModelProperty(value = "M10扣价/吨", example = "2")
    private BigDecimal m10Discount;

    @ApiModelProperty(value = "M40扣价/吨", example = "2")
    private BigDecimal m40Discount;

    @ApiModelProperty(value = "CSR扣价/吨", example = "2")
    private BigDecimal csrDiscount;

    @ApiModelProperty(value = "CRI扣价/吨", example = "2")
    private BigDecimal criDiscount;

}
